<section id="content">
    <section class="vbox">
        <section class="scrollable padder">
            <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
                <li><a href="{:url('Home/index')}"><i class="fa fa-home"></i> 首页</a></li>
                <li><a href="#">投诉列表</a></li>
            </ul>
            <section class="panel panel-default">
                <div class="table-responsive">
                    <table class="table table-striped m-b-none" data-ride="datatables" style="text-align:center!important;">
                        <thead>
                        <tr>
                            <th colspan="8">
                                <div class="row">
                                    <div class="col-sm-6 m-t-xs m-b-xs">
                                        <a id="unfinished" href="{:url('Report/index',array('status'=>0,'search'=>$search))}" class="btn btn-s-md btn-default">待处理</a>
                                        <a id="finish" href="{:url('Report/index',array('status'=>1,'search'=>$search))}" class="btn btn-s-md btn-default" >已处理</a>
                                    </div>
                                    <form class="col-sm-6" action="{:url('Report/index')}" method="post" enctype="multipart/form-data" style="text-align: center">
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" style="width: 100%" data-required="true" name="search" value="{$search}" placeholder="问答名">
                                        </div>
                                        <div class="col-sm-3">
                                            <button type="submit" class="btn btn-success btn-s-xs">搜索</button>
                                        </div>
                                    </form>
                                </div>
                            </th>
                        </tr>
                        <tr>
                            <th width="10%" style="text-align:center!important;">投诉问答</th>
                            <th width="10%" style="text-align:center!important;">投诉内容</th>
                            <th width="10%" style="text-align:center!important;">投诉资料</th>
                            <th width="15%" style="text-align:center!important;">投诉时间</th>
                            <th width="10%" style="text-align:center!important;">姓名</th>
                            <th width="10%" style="text-align:center!important;">电话</th>
                            {if $status==1}
                            <th width="15%" style="text-align:center!important;">备注</th>
                            {/if}
                            <th width="10%" style="text-align:center!important;">操作</th>
                        </tr>
                        </thead>
                        <tbody style="font-size:1em;">
                        {volist name="res" id="v"}
                        <tr>
                            <td>{$v.house_name}</td>
                            <td>{$v.report_content}</td>
                            <td>
                                {if $v.information}<a href="{:url('Report/look',array('id'=>$v.id))}" class="btn btn-default btn-sm" data-toggle="ajaxModal">查看</a>
                                {else /}暂无
                                {/if}
                            </td>
                            <td>{$v.create_time}</td>
                            <td>{$v.name}</td>
                            <td>{$v.phone}</td>
                            {if $status==1}
                            <td>{$v.results}</td>
                            {/if}
                            <td>
                                <a href="{:url('Report/deal',array('id'=>$v.id,'page'=>$page,'status'=>$status))}" class="btn btn-s-md btn-info btn-rounded" data-toggle="ajaxModal">处理</a>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
                <table border="0" style="width: 100%; height: 20px">
                    <tbody>
                    <tr>
                        <td style="width: 2px; height: 31px"></td>
                        <td style="width: 500px; height: 31px">
                                <span id="pager" style="font-family:宋体;font-size:12px;">
                                    <table border="0" style="font-family:宋体;font-size:12px;">
                                    <tbody>
                                    <tr>
                                        <td align="right">
                                            <span>
                                                共<font color="Red">{$count}</font>条记录&nbsp;&nbsp;当前<font
                                                    color="Red">{$page}</font>/<font color="Red">{$allpage}</font>页
                                            </span>
                                            &nbsp;[<a id="pager_First"
                                                      href="{:url('Report/index',array('page'=>1,'status'=>$status,'search'=>$search))}"
                                                      title="首页">首页</a>]
                                            &nbsp;[<a id="pager_Prev"
                                                      href="{:url('Report/index',array('page'=>$page-1,'status'=>$status,'search'=>$search))}"
                                                      title="前页">前页</a>]
                                            &nbsp;[<a id="pager_Next" title="后页"
                                                      href="{:url('Report/index',array('page'=>$page+1,'status'=>$status,'search'=>$search))}">后页</a>]
                                            &nbsp;[<a id="pager_Last" title="尾页"
                                                      href="{:url('Report/index',array('page'=>$allpage,'status'=>$status,'search'=>$search))}">尾页</a>]
                                            &nbsp;转到
                                            <form action="{:url('Report/index')}"
                                                  method="post"
                                                  style="display: inline">
                                                <input name="page" type="text" value="{$page}" id="pager_txbPage"
                                                       style="width:30px;">
                                                <input name="status" type="text" value="{$status}" id="status"
                                                       style="width:30px;display: none">
                                                <input name="search" type="text" value="{$search}" id="search"
                                                       style="width:30px;display: none">
                                                <input type="submit" name="pager$btnGo" value="转到" id="pager_btnGo">
                                            </form>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                                </span>
                        </td>
                        <td style="width: 100px; height: 31px"></td>
                    </tr>
                    </tbody>
                </table>
            </section>
        </section>
    </section>
    <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen, open" data-target="#nav,html"></a>
</section>
<script type="text/javascript">
    window.onload = function(){
        if({$status}==1){
            document.getElementById('finish').className='btn btn-s-md btn-primary';
        }else{
            document.getElementById('unfinished').className='btn btn-s-md btn-info';
        }
    }
</script>

<style type="text/css">
    img{
        width: 130px;
    }
</style>
<!-- datatables -->

